<?php

namespace app\common\model;

class Province extends BaseModel
{
    public function children()
    {
        return $this->hasMany(City::class,'pid');
    }


    public static function getAreaName($id)
    {
        $obj = self::find($id);
        return  $obj ? $obj->getData('name') : '';
    }
}
